﻿Namespace DNNCorp.Web
    Public Class ResourcesHandler
        Inherits DNNCorp.Web.BaseHttpHandler

        Public Overrides Sub HandleRequest()
            Dim resources() As String = Me.GetType().Assembly.GetManifestResourceNames()
            Dim x As XElement = _
            <html>
                <head>
                    <title>Resource List</title>
                </head>
                <body>
                    <%= From resource In resources _
                        Select <div>Resource: <%= resource %></div> _
                    %>
                </body>
            </html>

            Response.Write(x.ToString)
        End Sub

        Public Overrides Function ValidateParameters() As Boolean
            Return True
        End Function

        Public Overrides ReadOnly Property RequiresAuthentication() As Boolean
            Get
                Return False
            End Get
        End Property

        Public Overrides ReadOnly Property ContentMimeType() As String
            Get
                Return "text/html"
            End Get
        End Property
    End Class
End Namespace

